import request from '@/utils/request'

// 查询料单列表
export function listReceipt_form(query) {
  return request({
    url: '/labbase/receipt_form/list',
    method: 'get',
    params: query
  })
}

//库存查询
export function listInventory(query) {
  return request({
    url: '/labbase/receipt_form/query',
    method: 'get',
    params: query
  })
}

// 查询料单详细
export function getReceipt_form(receiptId) {
  return request({
    url: '/labbase/receipt_form/' + receiptId,
    method: 'get'
  })
}

// 新增料单
export function addReceipt_form(data) {
  return request({
    url: '/labbase/receipt_form',
    method: 'post',
    data: data
  })
}

// 修改料单
export function updateReceipt_form(data) {
  return request({
    url: '/labbase/receipt_form',
    method: 'put',
    data: data
  })
}
//提交流程
export function commitReceipt(data) {
  return request({
    url: '/labbase/receipt_form/commit',
    method: 'post',
    data: data
  })
}
// 删除料单
export function delReceipt_form(receiptId) {
  return request({
    url: '/labbase/receipt_form/' + receiptId,
    method: 'delete'
  })
}

// 导出料单
export function exportReceipt_form(query) {
  return request({
    url: '/labbase/receipt_form/export',
    method: 'get',
    params: query
  })
}
